using System;
using System.Web;

namespace FormsGenerator.Controls
{
	/// <summary>
	///		Summary description for TopBanner.
	/// </summary>
	public partial  class TopBanner : System.Web.UI.UserControl
	{

		protected void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
			/*
			foreach (string variable in Request.ServerVariables)
			{
				LabelUser.Text += variable + ": " + Request.ServerVariables[variable] + "<br />";
			}
			*/
			if (!IsPostBack)
			{
				LabelUser.Text += HttpContext.Current.User.Identity.Name;
				if (Session["ShowHelp"] != null && !(bool) Session["ShowHelp"])
				{
					CheckBoxShowHelp.Checked = false;
				}
				else
				{
					CheckBoxShowHelp.Checked = true;
				}
			}
		}

		

		protected void CheckBoxShowHelp_CheckedChanged(object sender, System.EventArgs e)
		{
			if (CheckBoxShowHelp.Checked)
			{
				Session["ShowHelp"] = true;
			}
			else
			{
				Session["ShowHelp"] = false;
			}
			RaiseBubbleEvent(sender, e);
		}
	}
}